import { pubRequire } from '@utils/public'
const baseUrl = '/welcome'
// 获取列表
export function getSimplifList(obj, callBack, errBack) {
  return pubRequire('get', `${baseUrl}`, obj, callBack, errBack)
}
// 欢迎页新增
export function addSimplif(params, callBack, errBack) {
  return pubRequire('post', `${baseUrl}`, params, callBack, errBack)
}
// 根据id获取编辑页详情
export function getEditSimplif(id, callBack, errBack) {
  return pubRequire('get', `${baseUrl}/${id}`, '', callBack, errBack)
}
// 欢迎页修改
export function editSimplif(id, params, callBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}`, params, callBack, errBack)
}
// 删除单个
export function delSimplif(id, callBack, errBack) {
  return pubRequire('delete', `${baseUrl}/${id}`, '', callBack, errBack)
}
// 启用欢迎页
export function putEnable(id, callBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}/open`, '', callBack, errBack)
}
// 关闭欢迎页
export function putDisable(id, callBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}/close`, '', callBack, errBack)
}
